Method of Establishing Hard Disk Physical Partition

ABSTRACT

The present invention provides a method of establishing a hard disk physical partition. First of all, it selects a sector in which the head of the hard disk physical partition is located, and establishes a user available partition of the hard disk within the range of the hard disk physical volume from the sector, the other portion of the hard disk becomes a protected partition of the hard disk, finally constitutes one hard disk physical partition. After entering into the hard disk physical partition, only the user available partition can be accessed, the protected partition is invisible to the user. It can establish the different hard disk physical partition in the different position of the hard disk through selecting the sector where the head of the hard disk is located. The present method can realize that protecting the various users&#39; data from each other in physical on the premise of sharing the same hard disk, thus establishes fully separate data storage space from physical level, causes the user to have a proprietary run environment.

BACKGROUND OF THE INVENTION

1. Field of Invention

The present invention relates to a method of establishing a hard diskphysical partition, particularly to a method of establishing a pluralityof hard disk physical partitions on a single hard disk.

2. Description of Prior Art

The computer application has penetrated into various fields. Most ofcomputers store data in hard disks. Generally, each computer has onehard disk. However, one and the same computer may serve a plurality ofusers or different application requirements.

In case of using a single hard disk, individual user generally wishes tohave a respectively separate running environment. Not only datainformation can be separated mutually, for example, it can not beinter-accessed with each other and have security and privacy etc., butalso respectively separate software environment may be established.Sometimes, one and the same user may need to establish differentsoftware running environments on the same hard disk for differentapplication requirements.

In prior art, it is possible to set a plurality of user accounts in asingle operating system (OS) of a computer. Each account records datainformation on the computer hard disk for respective users, in order toachieve the separation of different user data. For example, in Windows2000 and Windows XP, OS may serve a plurality of users, in which eachuser has his separate account and password and also a correspondingright. The user may encrypt files or file folders with keys generatedarbitrarily, by using a multi-user-supported Encrypting File System(EFS). When they have been encrypted, other user can't open them even ifhe is a system administrator.

In prior art, it is possible to install a plurality of OSs on one andthe same computer, in order to serve different application requirementsfor the users. At this time, various OSs may be installed in differentlogic partitions and may also be installed in one and the same logicpartition. Initiating an OS on the hard disk is mainly achieved by amain booting sector and a system booting sector. The main booting sectoris located at the head of the hard disk, i.e. a LBA0 sector, which isresponsible for searching for partitions available to be started by thehard disk. The main booting sector is booted by a basic input/outputsystem BIOS and is invoked into a memory for execution. The systembooting sector is located at the head of each partition. An SYS commandis responsible for booting the OS corresponding to its partition.

In the above prior art, different user data and OSs haven't beenseparated physically. Thus, it has limitations.

In terms of the approaches in which separate accounts and passwords areprovided for users in the above Windows 2000 and Windows XP, firstly itis required to be implemented in a particular OS; secondly, it alsoneeds a specific partition format of NTFS; thirdly, although it can notbe opened by the administrator with a high-level right, it may bedeleted; when files are copied into a FAT or FAT32 partition, theencryption is missing; and the amount of processing may be increased andthe running performance may be reduced by the encryption process.

In the prior art, a plurality of operation systems are installed on oneand the same computer. Since various OSs are firstly initialized by amain booting sector program which is started via the hard disk LBA0sector, if the LBA0 sector is damaged, it will affect a plurality of OSssimultaneously, which is of poor security. Furthermore, the plurality ofOSs are visible at the same time in the system, and they would bedamaged by other applications or viruses or artificial mal-operation,which are also of poor security.

The defaults in prior art as described above consist in the fact thatthe data for different users and OSs can not be distinguished at thephysical level, so that it is unable to provide users with completelyseparate software running environment.

SUMMARY OF THE INVENTION

As to the defects in prior art as described above, a main object of thepresent invention is to provide a method of establishing a hard diskphysical partition, which may provide users with a plurality of areas onone and the same hard disk which are physically separated from eachother, in order to enable data stored in different areas separatemutually in a physical level.

To solve the technical problem, the present invention provides a methodof establishing a hard disk physical partition, comprising the followingsteps:

1) When a computer start and information about physical partitiondivision is received, wherein the division information comprises ofwhich sector that the head of the hard disk physical partition locate inand the volume of the hard disk physical partition;

2) according to the sector in which the hard disk head of the hard diskphysical partition is located in the above received divisioninformation, the hard disk head is specified to this sector; and

3) according to the volume of the hard disk physical partition in theabove received division information, a hard disk space with the volume,beginning with the sector in which the hard disk head is located is setas a user available partition, and other sectors of the hard disk areset as protection partitions for the hard disk physical partition,wherein the volume of the hard disk physical partition is smaller thanthe physical volume of the hard disk.

In step 2), the sector in which the hard disk head is located may be asector which has been determined when the hard disk is shipped out.

The specification of the sector in step 2) may also be implemented byperforming an ATA instruction of a command Set FEATURES Enable AddressOffset Mode.

In step 3), the setting for the user available partition means that anATA instruction Set_Max_Address is performed.

After the command Set_Max_Address is performed, a commandSET_MAX_SET_PASSWORD may also be performed to set a password for lockingthe command Set_Max_Address; and next time before the commandSet_Max_Address is performed, a command SET MAX UNLOCK need be performedwith the previously set password in order to unlock the commandSet_Max_Address.

The ATA instructions described above are initiated when enter a BIOSenvironment t.

Before step 1), the step of selecting whether to divide a new hard diskphysical partition or not may further be comprised; in case of selectingto divide the new hard disk physical partition, step 1) is performed;otherwise, a selection of entering a certain hard disk physicalpartition is performed.

When the selection of entering the certain hard disk physical partitionis performed, a logic partition may be divided from the user availablepartition, and installing an OS.

The user available partition in the established new hard disk physicalpartition is located in the previous protection partition of theestablished hard disk physical partition, in order to avoid theestablished hard disk physical partition being damaged.

The head of hard disk for the new hard disk physical partition may belocated in a start sector for the previous protection partition of thehard disk physical partition, in order to make the maximum use of thevolume of the hard disk.

Compared with the prior art, the advantageous effect of the presentinvention is that the approach of hard disk partition according to thetechnical scheme of the present invention realizes the separation forhard disk in a physical level by changing the hard disk head on the harddisk, and by setting the user available partition and the userprotection partition according to the changed hard disk head. The useravailable partitions of different hard disk physical partitions arelocated in different sectors of the hard disk. That is to say, the useravailable partitions in the various hard disk physical partitions areall located in the protection partitions of other hard disk physicalpartitions. When an user enters a certain hard disk physical disk, onlythe user available partition of the hard disk physical partition isvisible to the user, while the protection partition of this physicalpartition is invisible to the user. Thus it is ensured that the userlocated in a certain hard disk physical partition can not access toother hard disk physical partition, which enables different partitionsphysically separated from each other.

Based on the above characters, it may provide the user with differentareas physically separated from each other on the premise of sharing thesame hard disk, according to the method of the present invention. Notonly the mutual independence of data for various users at the physicallevel is guaranteed, but the user is provided with a completelyproprietary software environment.

Since the method is only needed to be realized by performing severalinstructions on the software at the bottom layer without the addition ofany hardware, it has the advantages of simple implementation and noadditional cost.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a flowchart of a first embodiment of the method according tothe present invention;

FIG. 2 a to 2 e illustrate situations on hard disk partitioncorresponding to the respective steps in FIG. 1;

FIG. 3 is a flowchart of a second embodiment of the method according tothe present invention; and

FIG. 4 a to 4 h illustrate situations on hard disk partitioncorresponding to the respective steps in FIG. 3.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

Hereinafter, the present invention will be further described in detailby referring to the drawings and the embodiments in order to make theobjects, technical scheme and advantages of the present invention moreapparent.

Referring to FIG. 1, a first embodiment according to the presentinvention realizes that one hard disk is divided into two physicalpartitions.

In the present embodiment, the division of hard disk physical partitionis implemented by a computer program. The program may be a module inBIOS, which is referred as a module for physical partition division andis invoked before BIOS boots an OS on the hard disk. In a case that onthe hard disk it neither divides any spaces nor installs any OSsinitially (as referred in FIG. 2 a), the following operations areperformed:

Step S1 in which the computer is powered on and BIOS is started; themodule for physical partition division is invoked and it prompts theuser to divide the hard disk into a user available partition and aprotection partition, and records the selection of the user.

For example, the user available partition is located in the range of anLBA0 sector to an M sector which the user specifies, and the protectionpartition is located in the range of an M+1 sector to a sector in whichan actually physically maximum address (Native Max Address) of the harddisk is positioned.

Step S2 in which a command Set_Max_Address is performed in BIOS toprotect the protection partition above the M sector for realizing thephysical separation. At this time, the protection partition can't beaccessed by any software. The state after dividing the hard disk isillustrated in FIG. 2 b.

Step S3 in which BIOS continuously boots the hard disk; performs thepartition division in a normal manner in the user available partition(LBA0−M sector) which comprises a main partition and a logic partitionetc.; and installs the OS. The state of the hard disk is illustrated inFIG. 2 c.

Step S4 in which the computer is restarted and BIOS invokes the modulefor physical partition division; upon the selection of the user, acommand Set_FEATURES_Enable_Address_Offset_Mode is performed andre-specifies the position of the LBA0 sector for the hard disk to thestart position of the protection partition, a (M+1) sector.

It should be explained that firstly, re-specifying LBA0 to the positionof (M+1) sector is in order not to destroy the installed OS A and tomake the maximum use of the hard disk resources; theSet_FEATURES_Enable_Address_Offset_Mode command can specify the LBA0 toany section on the hardware; secondly, performing the instruction onre-specifying the LBA0 sector would not destroy any existing datainformation on the hardware.

The command Set_Max_Address is re-preformed to protect a sector abovethe sector for a new address Max-M+1 and protect a new protectionpartition, i.e. the original user available partition. When completingthe command, the state of the hard disk is illustrated in FIG. 2 d.

Step S5 in which BIOS continuously boots the hard disk; performs thepartition division in a normal manner for the new user availablepartition (new address LABO to the Max-M sector), which comprises a mainpartition and a logic partition etc.; and installs the OS B. When theinstallation is completed, the state of the hard disk is illustrated inFIG. 2 e.

Step S6 in which each time when the BIOS is started, OS A or B may beselected to be started in BIOS.

If the OS A is selected, the LBA0 is guaranteed to be set at the LBA0start position of the original hard disk by the module in BIOS, thecorresponding protection partition is protected, and the correspondingOS A is started from LBA0.

If the OS B is selected, the commandSet_FEATURES_Enable_Address_Offset_Mode is performed by the module forphysical partition division in BIOS, in order to guarantee that the LBA0is set at the (M+1) of the original hard disk; the commandSet_Max_Address is preformed in BIOS and the corresponding protectionpartition is protected, and the corresponding OS B is started from a newLBA0 position.

As described above, each time when the command Set_Max_Address is used,the command SET_MAX_SET_PASSWORD is immediately used to set a passwordprotection in 32-byte for locking the command Set_Max_Address. Thepurpose is to prevent other programs from entering BIOS and fromchanging the setting for the user available partition and the protectionpartition of the physical hard disk, so as to ensure that theestablished physical hard disk can not be damaged illegally.Hereinafter, each time before the command Set_Max_Address is used, acommand SET_MAX_UNLOCK must be performed in connection with thepreviously set 32-byte password in order to unlock the commandSet_Max_Address.

Referring to FIG. 3, a flowchart of a second embodiment according to thepresent invention is illustrated. It may obtain a plurality of OSsindependent from each other and physically separated on one and the samehard disk, so as to install Windows 98, Windows 2000, Windows XP, Linux,Novell, Unix etc simultaneously.

Physical separation is realized, and the module for physical partitiondivision for LBA0 sector position may be set to locate in BIOS and maybe invoked before BIOS boots the OS on the hard disk. As illustrated inFIG. 4 a, the hard disk initially neither divides any space nor installsany OSs.

The actual operation steps are as follows:

Step S1 in which the computer is powered on, and a module for BIOSinvoking is started to prompt the user to divide a user availablepartition and a protection partition.

For example, the user available partition is located in the range of anLBA0 sector to an M sector which the user specifies, and the protectionpartition is located in the range of an M+1 sector to a sector in whichan actually physically maximum address (Native Max Address) of the harddisk is positioned.

Step S2 in which a command Set_Max_Address is performed in BIOS toprotect the protection partition above the M sector for realizing thephysical separation. At this time, the protection partition can't beaccessed by any software. After the execution, the state of the harddisk is illustrated in FIG. 4 b.

Step S3 in which BIOS continuously boots the hard disk; performs thepartition division in a normal manner for the user available partition(LBA0−M sector) which comprises a main partition and a logic partitionetc.; and installs the OS A (eg. Windows98). The state of the hard diskafter installation is illustrated in FIG. 4 c.

Step S4 in which the computer is restarted and BIOS invokes the module;upon the selection of the user, a commandSet_FEATURES_Enable_Address_Offset_Mode is performed and re-specifiesthe position of the LBA0 sector for the hard disk to the start positionof the protection partition, that is, a (M+1) section. When the processis completed, the state of the hard disk is illustrated in FIG. 4 d.

It should be explained that firstly, re-specifying LBA0 to the positionof (M+1) sector is in order not to destroy the installed OS A and tomake the maximum use of the hard disk resources which may theoreticallybe specified to any positions larger than the (M+1) sector; secondly,performing the instruction on re-specifying the LBA0 sector would notdestroy any existing data information on the hard disk.

Step S5 in which a new user available partition (LBA0−N sector) isdivided at the start position of the original protection partition (anew LBA0 sector). After the execution, the state of the hard disk isillustrated in FIG. 4 e.

A new user available partition N is smaller than the original protectionpartition.

Step S6 in which the command Set_Max_Address is re-preformed to protecta sector above the sector for a new address N+1 and to protect a newprotection partition, i.e. the original user available partition and aportion of the original protection partition. When completing thecommand, the state of the hard disk is illustrated in FIG. 4 f.

Step S7 in which BIOS continuously boots the hard disk; performs thepartition division in a normal manner for the new user availablepartition (new address LABO to the N sector) which comprises a mainpartition and a logic partition etc.; and installs the OS B. When it iscompleted, the state of the hard disk is illustrated in FIG. 4 g.

Step S8 in which step 4 to step 7 are repeated and the originalprotection partition may be continuously divided and OSs C, D, E . . .are installed respectively, as illustrated in FIG. 4 h.

Each time when the BIOS is started, system A, B, C or D . . . may beselected for initiation in BIOS.

If the OS A is selected, the LBA0 is guaranteed to be set at the LBA0start position of the original hard disk by the module in BIOS; thecorresponding protection partition is protected, and the correspondingOS A is started from LBA0.

If the OS B is selected, the LBA0 is guaranteed to be set at (M+1) ofthe original hard disk by the module in BIOS, the correspondingprotection partition is protected, and the corresponding OS B is startedfrom a new LBA0 position . . . and so on. In case that the LBA0 isguaranteed to be set to a correct position and that the correspondingprotection partition is protected, any of OSs may be started.

The above is only the preferred embodiments of the present invention andthe present invention is not limited to the above embodiments.Therefore, any modifications, substitutions and improvements to thepresent invention are possible without departing from the spirit andscope of the present invention.

1. A method of establishing a hard disk physical partition, comprisingthe following steps: 1) a computer is started and information onphysical partition division is received, wherein the divisioninformation comprises a sector in which a hard disk head for the harddisk physical partition is located and a volume of the hard diskphysical partition; 2) according to the sector in which the hard diskhead for the hard disk physical partition is located in the abovereceived division information, the hard disk head is specified to thissector; and 3) according to the volume of the hard disk physicalpartition in the above received division information, a hard disk spacewith the volume, beginning with the sector in which the hard disk headis located is set as a user available partition, and other sectors ofthe hard disk are set as protection partitions for the hard diskphysical partition, wherein the volume of the hard disk physicalpartition is smaller than the physical volume of the hard disk.
 2. Themethod according to the claim 1, wherein the sector in which the harddisk head is located in Step 2) is a sector which has been determinedwhen the hard disk is shipped out.
 3. The method according to the claim1, wherein the specification of the sector in step 2) comprisesperforming an ATA instruction of a commandSet_FEATURES_Enable_Address_Offset_Mode.
 4. The method according to theclaim 1, wherein the setting for the user available partition in step 3)comprises performing an ATA instruction Set_Max_Address.
 5. The methodaccording to the claim 1, wherein after the command Set_Max_Address isperformed, a command SET_MAX_SET_PASSWORD is also performed to set apassword for locking the command Set_Max_Address; and before the commandSet_Max_Address is performed, a command SET_MAX_UNLOCK is performed inconnection with the previously set password in order to unlock thecommand Set_Max_Address.
 6. The method according to claim 3, wherein theATA instructions enter a BIOS environment to be performed when they areinitiated.
 7. The method according to the claim 1, which furthercomprises the step of selecting whether to divide a new hard diskphysical partition or not before step 1); in case of selecting to dividethe new hard disk physical partition, step 1) is performed; otherwise, aselection of entering a certain hard disk physical partition isperformed.
 8. The method according to the claim 7, wherein when theselection of entering the certain hard disk physical partition isperformed, it further comprises dividing a logic partition from the useravailable partition and then installing an OS.
 9. The method accordingto the claim 7, wherein the user available partition for the new harddisk physical partition is located in the protection partition of theestablished hard disk physical partition.
 10. The method according tothe claim 7, wherein the hard disk head for the new hard disk physicalpartition is located in a start sector for the protection partition ofthe established hard disk physical partition.
 11. The method accordingto claim 4, wherein the ATA instructions enter a BIOS environment to beperformed when they are initiated.
 12. The method according to claim 5,wherein the ATA instructions enter a BIOS environment to be performedwhen they are initiated.